package com.longge;

public class NMaxDepth {
    public int maxDepth(NTreeNode root) {
        if (root == null) return 0;
        if (root.children == null) return 1;
        int max = 0;
        for (int i = 0; i < root.children.size(); i++) {
            int val = maxDepth(root.children.get(i));
            max = Math.max(val, max);
        }
        return max + 1;

    }

    public static void main(String[] args) {
        System.out.println(System.currentTimeMillis());
    }
}
